package com.example.anno.ioc;

import com.example.anno.utils.Utils;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static com.example.anno.utils.Utils.printBeanName;

public class Example {

    public static void main(String[] args) {

        ConfigurableApplicationContext context =
                new AnnotationConfigApplicationContext(DIConfig.class);

        printBeanName(context);

        context.close();
    }
}
